package sonnensystem;

import java.awt.Color;

/**
 *
 * @author Sebastian Bauer
 */
public abstract class Himmelskoerper {

    protected double radius;
    protected String farbe;
    protected String name;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getFarbe() {
        return farbe;
    }

    public void setFarbe(String farbe) {
        this.farbe = farbe;
    }

    public double getRadius() {
        return radius;
    }

    public void setRadius(double radius) {
        this.radius = radius;
    }

    protected String farbeNachVRML() {
        Color color = Color.decode(farbe);
        double red = color.getRed() / 255.0;
        double green = color.getGreen() / 255.0;
        double blue = color.getBlue() / 255.0;
        return red + " " + green + " " + blue;
    }
    
    public abstract String baueVRML();
}
